<template>
  <van-tabbar v-model="active" @change="changeTab">
    <van-tabbar-item icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item icon="search">查询</van-tabbar-item>
    <!-- <van-tabbar-item icon="friends-o">标签</van-tabbar-item>
    <van-tabbar-item icon="setting-o">标签</van-tabbar-item> -->
  </van-tabbar>
</template>
<script>
import Vue from "vue";
import { Tabbar, TabbarItem } from "vant";

Vue
.use(Tabbar)
.use(TabbarItem);

export default {
  name: "App-footer",
  data() {
    return {
      active: ''
    };
  },
  props: ["value"],
  watch: {
    value(val) {
      this.active = val;
    }
  },
  methods: {
    changeTab(e) {
      this.$emit('changeTab', e);
    }
  },
  mounted() {
    this.active = this.value;
  }
};
</script>
<style scoped lang="less">
</style>